home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD School House 10
/
CD School House - Education and Games (10.0) - Wayzata Technology (1995).iso
/
mac
/
DOS
/
MATH
/
TOPOV100
/
TOPO.DOC
< prev
next >
Wrap
Text File
|
1992-09-06
|
12KB
|
287 lines
T O P O - The 3-D Topographic Map Plotting Program
Version 1.0
(c) 1992 by Donald A. Burrows
Basic Instructions
INTRODUCTION
This program began as a long time dream to be able to put topographic
maps in to my comuter so that I could view any region at any scale and
from any point of view I desired. My opportunity came when I acquired
an AT clone and gained access to an USGS topographic data base of the
United States on a mainframe computer. The entire database was too
large for my 60MB hard disk so I chopped portions of it into 1 degree
latitude by 1 degree longitude blocks and stored them as individual
files on floppy diskettes. At the same time I discovered Lee Adams'
book "Supercharged C Graphics" which gave me the 3-D graphics subroutines
I needed to put together this program. It's a fairly flexible program
that allows one to depict the data not only as more or less traditional
contour maps (Conic Projection, with standard parallels at 38 and 46
degrees North), but also as 3-D oblique views both with color contours
and black and white shaded relief surfaces.
The program is designed primarily to be used in the VGA 640x480x16
mode, but will operate in the EGA 640x350x16 and 640x200x16 modes as
well but with degraded graphics. While it will run without a math
co-processor, it is highly recommended to have one as otherwise the
plotting procedure can be incredibly slow. It's performance on an AT
with a math co-processor is adequate, but it runs very nicely on 33MHz
486 machine. The program was intended to be used on a hard disk with
the topographic data files on floppy diskettes; however, it can be
run with both program and data on floppys or both on the hard disk.
GETTING STARTED
This section is for those who want to learn the program by doing.
Examples will be given showing how to produce several different types
of maps. It is assumed that the files TP46121.DAT, WESTWASH.PCX and
MTRAINR.PCX are present in the same directory or diskette as TOPO.EXE.
Assuming the files are on the C drive in a directory named TOPO,
the program can be started by entering
C:\TOPO > TOPO
Once the program screen is displayed, then menu selections can be
made by either using a mouse and the left mouse button or by the use of
the arrow and enter keys. Most menu boxes can be exited by using the
escape key or the right mouse button.
To start with here is how to view two completed maps.
Map #1 - WESTWASH.PCX - This is a color contour map of western
Washington state and southwestern British Columbia, and covers all
the area contained in the MAPDATA1.ZIP file. and consists of 22, 1
degree by 1 degree quadrangles.
1. Using mouse and left button or arrow and enter keys select REGION.
2. Next select the item LOAD MAP in the menu box.
3. Enter WESTWASH.PCX followed by <ENTER>. It should be displayed
on the bottom line.
Map #2 - MTRAINR.PCX - This is a black and white shaded relief view
of Mount Rainier from 23 miles to the northwest. To view it repeat steps
1 and 2 above, then enter MTRAINR.PCX followed by <ENTER>.
This next section tells how to create new maps of the region in
the topographic data file TP46121.DAT which shows a section of the
Cascade mountains of southern Washington including two major volcanic
peaks, Mt. Rainier (14,410 ft.) and Mt. Adams (12,326 ft.).
Map #3 - Plot the entire 1 degree quadrangle contained in TP46121.DAT.
1. select REGION
2. select SELECT REGION
3. enter for Northern Boundary 47 <ENTER>
enter for Southern Boundary 46 <ENTER>
enter for Western Boundary 122 <ENTER>
enter for Eastern Boundary 121 <ENTER>
4. select TYPE
5. select HIRES CONTOUR
6. select FEATURES
7. select VIEWPOINT
8. enter for Azimuth Angle 0 <ENTER> (North at top of screen)
enter for Vertical Angle 0 <ENTER> (View from directly overhead)
enter for Distance (miles) 0 <ENTER> (Autoscale to fit area on screen)
9. select FEATURES
10. select SET CONTOURS
11. enter for base elevation (ft) 0 <ENTER> (sea-level)
enter for contour interval (ft) 1000 <ENTER>
12. select REGION
13. select CLEAR SCREEN (assuming an image is already being displayed)
14. select REGION
15. select DISPLAY
Map #4 - Once the whole region is displayed, then particular areas
of interest can be noted and a new map centered on those regions can be
created. In this case the focus shifts to Mt. Rainier in the northwest
corner of the previous map and a black and white shaded relief drawing
is specified.
1. select REGION
2. select SELECT REGION
3. enter for Northern Boundary 47
enter for Southern Boundary 46.75
enter for Western Boundary 122
enter for Eastern Boundary 121.5
4. select TYPE
5. select SHADED (B/W)
6. select FEATURES
7. select VIEWPOINT
8. enter for Azimuth Angle 90 (0 is viewing to the north, 90 to
the east, 180 to the south and 270 to the west)
enter for Vertical Angle 80 (This is 80 degrees from overhead or
10 degrees above the horizon)
enter for Distance 16 (miles)
9. select FEATURES
10. select SET SOLAR ANGLE
11. enter for Solar Azimuth 120 (180 is directly behind observer, 90
to the observers right, 270 to observers left and 0 directly in
front of observer.)
12. enter for Solar Height 35 (90 places sun overhead, 0 at horizon)
13. select REGION
14. select CLEAR SCREEN
15. select REGION
16. select DISPLAY
DESCRIPTION OF MENU OPTIONS
REGION - Under this heading a map region can be specified, the screen cleared,
a completed map viewed, a newly drawn map saved or the current selection
plotted.
SELECT REGION - Under this heading the northern, southern, western and
eastern boundaries of a region to be plotted can be specified. The units
are degrees and decimal fractions of degrees. North latitude and West
longitude are positive values.
CLEAR SCREEN - This removes any currently displayed images from the
screen. In the black and white mode it can also be used to replace
a black background with a white background.
LOAD MAP - This is for viewing saved maps and should work with any
ZSoft PCX files.
SAVE - This is used to save completed maps using the ZSoft PCX format.
Files are automatically named beginning with mapfil00.pcx up through
mapfil99.pcx.
DISPLAY - This causes a map to be plotted using the currently specified
map parameters.
TYPE - Under this heading the map plotting mode i.e contour or shaded, can
be selected.
SHADED (B/W) - This specifies a black and white shaded relief type plot.
If a black background is desired choose CLEAR SCREEN before selecting
SHADED (B/W). If a white background is desired then choose CLEAR SCREEN
after selecting SHADED (B/W). This also specifies a high contrast mode.
A lower contrast mode can be obtained by selecting ALT PALETTE under
FEATURES.
HIRES CONTOUR - This specifies a plot using the color contour mode. It
also specifies a blue background. Using HIRES CONTOUR and ALT PALETTE
one can toggle back and forth between a white background and a blue
background.
ABOUT TOPO - Displays version, author and copyright date.
FEATURES - Under this heading a number of different plotting options can
be specified, such as selecting an alternate color palette, setting the
point from which the map is to be viewed, setting the contour interval,
and setting the direction of the lighting.
ALT PALETTE - In color contour mode this specifies a palette with a
white background and a pink max contour color. In black and white mode
it specifies a lower contrast gray scale than the default palette.
SET VIEWPOINT - This is used to specify the placement of the observer
relative to the map. The default azimuth angle is 0 degrees which places
north at the top of the map. 90 would place east at the top, 180 - south,
and 270 - west. The default vertical angle is 0 degrees which indicates
that the map is being viewed from directly overhead. 90 degrees in this
case would mean that the observer would be looking at the map horizontal-
ly from sea-level. Distance is specified in miles from a point at
sea-level located horizontally in the center of the map. The default
value is 155 miles which is a good value for observing a 1 degree by 1
degree region from directly overhead. Entering a distance of 0,
will cause the program to autoscale to fit the selected region on the
screen assuming that both azimuth angle and vertical angles are also 0.
SET CONTOURS - This option is used to specify the altitude from which
color contours are computed and the altitude interval between successive
colors. In the 16 color mode there are 15 altitude intervals. If the
base elevation is 0 (sea-level) and the contour interval is 500 ft. then
the background (blue or white) color will indicate all regions of
altitude 0; the dark green, altitude 0 to 500; up to white or pink for
all regions over 7500 ft. The default value of the base elevation is 0,
and the default value for the contour interval is 600 ft. Note: In the
topographic data files the elevations are specified to only the nearest
10 meters above sea level, consequently areas that are less than 5
meters above sea level have apparently been rounded off to 0 so that
they will be displayed asocean instead of being displayed as land.
The order of the color contours is as follows:
Sea Blue / White
Dark Green
Green
Light Green
Dark Yellow-Green
Light Yellow-Green
Yellow
Brown
Dark Brown
Tan
Orange
Dark Gray
Light Gray
Light Tan
Light Olive
White / Pink
SET SOLAR ANGLE - This applies to the shaded mode and determines the
direction of the lighting relative to the observer. A solar azimuth
angle of 0 has the lighting coming from directly in front of the observer,
while a value of 90 will have it coming from the observers right, 180 -
from behind the observer and 270 - from the observers left. Solar height
determines the vertical angle from which the lighting will come. In
this case 0 degrees would indicate the sun is on the horizon of the
map and 90 would place it directly overhead. Default values are: Solar
Azimuth - 120 degrees and Solar Height 35 degrees.
MAGNIFY - This allows the vertical scale of the maps to be enhanced. It
has no effect of the contour display. Selecting x1 means that there is no
vertical exageration i.e. the vertical scale is the same as the horizontal
scale. Four different vertical magnifications can be selected. 1.5 times
normal, 2 times normal, 3 times normal and 5 times normal.
QUIT - This exits the program. Pressing <ALT>X has the same effect.
Version 1.0 of TOPO is a first release and the author would appreciate
hearing about your experiences and ideas concerning TOPO. Other
topographic files can also be obtained. Contact the author for more
information at
GE mail address D.BURROWS2
or Don Burrows
526 Belmont Road
Grand Forks, ND 58201
(701) 775-3523
--------------------IMPORTANT -- WARRANTY & DISCLAIMER -----------------
TOPO version 1.0 is freely provided for use without charge and may be
freely distributed. The author makes NO warranties, expressed or implied
as to the quality or the performance of this program. The author will
NOT be held liable for any direct, indirect, incidental or consequential
damage resulting from the use of this program. Your use of this program
constitutes your agreement to this disclaimer and your release of the
author from any form of liability or litigation.
----------------------------------------------------------------------------